-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support prefilling prompt #2459
Conversation
Add capabilities like reusing current symbol when renaming etc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Not tested but I like this behavior, miss this for rename symbol.
For rename symbol I think it would be more useful to prefill with the symbol to be renamed rather than the selection which feels more intuitive. |
It's not easy to determine current symbol without talking with lsp server as it depends on the language. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thanks. But I think maybe @archseer should have another look, since I am not sure if there is a better way around this.
There's a It will return the offsets of the string we're renaming: https://github.com/emacs-lsp/lsp-mode/blob/6157b3dde2c56f734a0789225240c521acdf2c7c/lsp-mode.el#L5849-L5871= |
Do we need below option too? This would make the case complex and I am not sure if I can handle this right now.
|
I think it's okay to skip this for now and add a per LSP config option in the future if issues arise. |
* support prefilling prompt * introduce with_line builder method in Prompt * extract show_prompt * use textobject_word as fallback input
No description provided.